<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Module      :  System.Mem</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2001</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- </span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Memory-related system things.</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- allocation counter stuff is safe, but GHC.Conc.Sync is Unsafe</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">System.Mem</span><span>
</span><span id="line-19"></span><span>       </span><span class="hs-special">(</span><span>
</span><span id="line-20"></span><span>       </span><span class="annot"><span class="hs-comment">-- * Garbage collection</span></span><span>
</span><span id="line-21"></span><span>         </span><span class="annot"><a href="System.Mem.html#performGC"><span class="hs-identifier">performGC</span></a></span><span>
</span><span id="line-22"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="System.Mem.html#performMajorGC"><span class="hs-identifier">performMajorGC</span></a></span><span>
</span><span id="line-23"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="System.Mem.html#performMinorGC"><span class="hs-identifier">performMinorGC</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Allocation counter and limits</span></span><span>
</span><span id="line-26"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#setAllocationCounter"><span class="hs-identifier">setAllocationCounter</span></a></span><span>
</span><span id="line-27"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#getAllocationCounter"><span class="hs-identifier">getAllocationCounter</span></a></span><span>
</span><span id="line-28"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#enableAllocationLimit"><span class="hs-identifier">enableAllocationLimit</span></a></span><span>
</span><span id="line-29"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#disableAllocationLimit"><span class="hs-identifier">disableAllocationLimit</span></a></span><span>
</span><span id="line-30"></span><span>       </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html"><span class="hs-identifier">GHC.Conc.Sync</span></a></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- | Triggers an immediate major garbage collection.</span><span>
</span><span id="line-35"></span><span class="annot"><a href="System.Mem.html#performGC"><span class="hs-identifier hs-type">performGC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span id="performGC"><span class="annot"><span class="annottext">performGC :: IO ()
</span><a href="System.Mem.html#performGC"><span class="hs-identifier hs-var hs-var">performGC</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="System.Mem.html#performMajorGC"><span class="hs-identifier hs-var">performMajorGC</span></a></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-comment">-- | Triggers an immediate major garbage collection.</span><span>
</span><span id="line-39"></span><span class="hs-comment">--</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-41"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;performMajorGC&quot;</span></span><span> </span><span id="performMajorGC"><span class="annot"><a href="System.Mem.html#performMajorGC"><span class="hs-identifier hs-var">performMajorGC</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-comment">-- | Triggers an immediate minor garbage collection.</span><span>
</span><span id="line-44"></span><span class="hs-comment">--</span><span>
</span><span id="line-45"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-46"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-string">&quot;performGC&quot;</span></span><span> </span><span id="performMinorGC"><span class="annot"><a href="System.Mem.html#performMinorGC"><span class="hs-identifier hs-var">performMinorGC</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-47"></span></pre></body></html>